package com.cll.mybatisPlus.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.cll.mybatisPlus.mapper.UserMapper;
import com.cll.mybatisPlus.model.entity.User;
import com.cll.mybatisPlus.service.IUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author chenliangliang123
 * @since 2018-01-27
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {


    private UserMapper userMapper;

    @Autowired
    protected UserServiceImpl(UserMapper userMapper){
        this.userMapper=userMapper;
    }


    @Override
    public Page<User> list(Page<User> page, Integer state) {
        return page.setRecords(userMapper.selectUserList(page,state));
    }
}
